package LeetCode.month02.day54;

import java.util.Arrays;

public class No1033 {
    public int[] numMovesStones(int a, int b, int c) {
        int[] nums = new int[]{a,b,c};
        Arrays.sort(nums);
        int[] res = new int[2];
        if(nums[2]-nums[0]==2) res[0] = 0;
        else if(nums[1]-nums[0]==2 || nums[2]-nums[1]==2||nums[1]-nums[0]==1||nums[2]-nums[1]==1)
            res[0] = 1;
        else res[0] = 2;
        res[1] = nums[2]-nums[0]-2;
        return res;
    }
}
